package com.jingdinajichi.subject.common.enmus;

import lombok.Getter;

/**
 * @author bug制作者
 * @version 1.0
 * @description: TODO
 * @date 2025/7/5 16:39
 */
@Getter
public enum IsDeleteCodeEnum {
    DELETE_CODE_ENUM(1, "已删除"),
    NOT_DELETE_CODE_ENUM(0, "未删除");
    private int code;
    private String desc;

    IsDeleteCodeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public static IsDeleteCodeEnum getByCode(int codeVal) {
        for (IsDeleteCodeEnum resultCodeEnum : IsDeleteCodeEnum.values()) {
            if (resultCodeEnum.getCode() == codeVal) {
                return resultCodeEnum;
            }
        }
        return null;
    }

}
